{:W('Header')}
<div class="list-div" id="listDiv">
    <table width="90%" style="margin: 0 auto" >
        <tr style="font-size: 15px;background-color: #78C3F3;height: 40px">
            <th style="">订单号</th>
            <th>支付方式</th>
            <th>支付状态</th>
            <th>时间</th>
            <th>订单总金额</th>
            <th>订单状态</th>
            <th>操作</th>
        </tr>
        <tr><td>&nbsp;</td></tr>
        <foreach name="orderArr" item="v">
            <tr align="center" style="height: 30px;font-size: 15px;">
                <td>
                    <a href="{:U(GROUP_NAME.'/Order/orderInfo',array('orderId'=>$v['id']))}" style="color: #0d3c4d;font-weight: bold">{$v.order_sn}</a>
                </td>
                <td>{$v.payment}</td>
                <td>{$v.pay_status}</td>
                <td>
                    <if condition="$v.pay_time ">
                        {$v.pay_time|date="Y-m-d H:i:s",###}
                        <else/>
                        {$v.add_time|date="Y-m-d H:i:s",###}
                    </if>
                </td>
                <td>{$v.total}元</td>
                <td>{$v.order_status}</td>
                <td>
                    <if condition="($v.order_status eq '未确认') AND ($v.pay_status eq '未支付') " >
                        <form action="{:U(GROUP_NAME.'/Order/cancel')}" method="post">
                            <input type="hidden" name="orderId" value="{$v['id']}">
                            <input type="submit" value="取消" style="width:60px" >
                        </form>

                    <else/>
                        无法取消
                    </if>
                </td>
            </tr>
        </foreach>
    </table>
    <if condition="!is_array($orderArr) ">
        <div style="text-align:center">
            <a href="{:U(GROUP_NAME.'/Index')}">
                <span style="font-weight: bolder;font-size: 20px;color: #000;">无记录</span>
            </a>
            <div>
                <a href="{:U(GROUP_NAME.'/Index')}">
                    <img src="__PUBLIC__/Images/cart.jpg" alt="无记录">
                </a>
            </div>
        </div>
    </if>
</div>
{:W('Footer')}